import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'

Vue.use(VueRouter)

import List from "../views/List.vue";
import Pay from "../views/Pay.vue";
import Recording from "../views/Recording.vue";

const routes: Array<RouteConfig> = [
  {
    path: '*',
    redirect: '/pay'
  },
  {
    path: '/',
    redirect: '/pay'
  },
  {
    path: '/list',
    name: 'List',
    component: List
  },
  {
    path: '/pay',
    name: 'Pay',
    component: Pay
  },
  {
    path: '/recording',
    name: 'Recording',
    component: Recording
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
